package config

import (
	"mldong/api/base"

	"github.com/gogf/gf/v2/frame/g"
)

type SaveReq struct {
	g.Meta `path:"/sys/config/save" tags:"配置管理" method:"post" summary:"添加配置"`
	ConfigParam
}
type UpdateReq struct {
	g.Meta `path:"/sys/config/update" tags:"配置管理" method:"post" summary:"修改配置"`
	ConfigParam
}
type DetailReq struct {
	g.Meta `path:"/sys/config/detail" tags:"配置管理" method:"post" summary:"配置详情"`
	ID     string `json:"id" dc:"配置ID" v:"required#请输入配置ID"`
}

type DetailRes struct {
	base.CommonResult
	Data ConfigVO `json:"data" dc:"配置信息"`
}
type RemoveReq struct {
	g.Meta `path:"/sys/config/remove" tags:"配置管理" method:"post" summary:"删除配置"`
	Ids    []string `json:"ids" dc:"配置ID集合" v:"required#请输入配置ID集合|min-length:1"`
}
type PageReq struct {
	g.Meta `path:"/sys/config/page" tags:"配置管理" method:"post" summary:"配置分页查询"`
	base.PageParam
}
type ConfigPageVO struct {
	base.PageVO
	Rows []ConfigVO `json:"rows" dc:"数据列表"`
}
type PageRes struct {
	base.CommonResult
	Data ConfigPageVO `json:"data" dc:"配置分页返回实体"`
}
